﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DesignPattern.StructureType.Component
{
    public abstract class AbstractFile
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        public FileType Type { get; set; }

        public AbstractFile(string name , FileType type)
        {
            this.Name = name;
            this.Type = type;
        }

        /// <summary>
        /// 显示
        /// </summary>
        public abstract void Show();

        /// <summary>
        /// 双击操作
        /// </summary>
        public abstract void Click();
    }

    public enum FileType
    { 
        /// <summary>
        /// 文件夹
        /// </summary>
        Folder,
        /// <summary>
        /// 文件
        /// </summary>
        File
    }
}
